// import chooseEnv from './components/chooseEnv';
// ========================================================
const size = '36px';
const style = {
	right: '30px',
	bottom: '30vh',
	color: 'white',
	zIndex: 10000,
	width: size,
	height: size,
	lineHeight: size,
	fontSize: '18px',
	cursor: 'pointer',
	position: 'fixed',
	textAlign: 'center',
	borderRadius: '50%',
	backgroundColor: '#FF6666',
	boxShadow: '1px 1px 6px #6666',
};
const SwitchEnv = (hook, { SwapOutlined }) => {
	return {
		isJiess: true,
		name: 'SwitchEnv',
		setup() {
			this.add({
				style,
				onClick: () => {
					this.dialog.open(function(show) {
						return {
							title: '环境切换',
							onCancel: () => show.value = false,
							okButtonProps: { style: { display: 'none' } },
							children: { is: chooseEnv },
						};
					});
				},
				children: {
					is: SwapOutlined
				}
			});
		},
	};
};
export default SwitchEnv;